<div class="SipeiInfo">
    <?php $form=$this->beginWidget('CActiveForm', array('id'=>'myform','htmlOptions'=>array('target'=>'ajax-frame'))); ?>
    <div id="main_box"  style="height:350px;overflow-y:auto;overflow-x:hidden; width:460px; margin-top:10px;">
        <table class="fontc_666 height32">
            <tbody>
                <tr>
                    <td width="125" align="right" class="pt20 pr5 pb20"><span class="pr5 fontc_orange_red">*</span>上级功能：</td>
                    <td width="320" class="pt20 pb20">            
                        <span class="fl standard_select pt5 pr7 pb5 pl3 border_c border_3">
                            <span class="fl select_shelter">
                                <select class="fl fontc_666" name="parentid">
                                    <option value="0">一级功能</option>
                                    <?php echo $option; ?>
                                </select>
                            </span>
                        </span>
                    </td>
                </tr>
                <tr height="55">
                    <td valign="top" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>功能代码：</td>
                    <td valign="top" class="formValidator_td">
                        <input type="text" name="ename" id='ename' value="" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                        <div class="formValidator_tip">
                            <p id="enameTip" ></p>
                        </div>
                    </td>
                </tr>
                <tr height="55">
                    <td valign="top" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>功能名称：</td>
                    <td valign="top" class="formValidator_td">
                        <input type="text" name="cname" id='cname' value="" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                        <div class="formValidator_tip">
                            <p id="cnameTip" ></p>
                        </div>
                    </td>
                </tr>
                <tr height="55">
                    <td valign="top" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>模块名称：</td>
                    <td valign="top" class="formValidator_td">
                        <input type="text" name="m" id="m" value="" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                        <div class="formValidator_tip">
                            <p id="mTip" ></p>
                        </div>
                    </td>
                </tr>
                <tr height="55">
                    <td valign="top" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>文件名称：</td>
                    <td valign="top" class="formValidator_td">
                        <input type="text" name="c" id="c" value="" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                        <div class="formValidator_tip">
                            <p id="cTip" ></p>
                        </div>
                    </td>
                </tr>
                <tr height="55">
                    <td valign="top" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>方法名称：</td>
                    <td valign="top" class="formValidator_td">
                        <input type="text" name="a" id="a" value="" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                        <div class="formValidator_tip">
                            <p id="aTip" ></p>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="pr5">是否显示：</td>
                    <td><input type="checkbox" name="check" checked="checked" /></td>
                </tr>
                <tr>
                    <td align="right" valign="top" class="pt10 pr5 pb20">备注：</td>
                    <td class="pt10 pb20"><textarea name="comment" class="col3 pt6 pr10 pb6 pl10 border_c border_3 fontc_666"></textarea></td>
                </tr>
                <tr>
                    <td colspan="2" align="center" class="pb20">
                        <input type="hidden" name="mid" value="<?php echo $mid; ?>" />
                        <input type="submit" value="保存" class="b_a_n border_3 cursor back_bgfb w80 height32 fontc_FFF fonts_12 mr10 cursor" />
                        <input type="button" value="取消" onClick="api.close()" class="b_a_n border_3 cursor back_bgb w80 height32 fontc_FFF fonts_12 cursor" />
                    </td>
                </tr>    	
            </tbody>
        </table>
    </div>
    <?php $this->endWidget(); ?>
</div>
<iframe src='' style="display:none" name='ajax-frame'></iframe>
<style>
    #main_box::-webkit-scrollbar{height:8px;width:8px;background:rgba(222, 222, 222, 0.5);border-radius:5px;}
    #main_box::-webkit-scrollbar-button{display:none;}
    #main_box::-webkit-scrollbar-track{background-color:#ffffff;}
    #main_box::-webkit-scrollbar-track-piece{background:#ffffff;}
    #main_box::-webkit-scrollbar-thumb{width:8px;min-height:15px;background:rgba(0, 0, 0, 0.3);border-radius:5px;}
    #main_box::-webkit-scrollbar-thumb:hover{background:rgba(0, 0, 0, 0.6);}
    #main_box::-webkit-scrollbar-thumb:active{background:rgba(0, 0, 0, 0.8);}
</style>
<script>
$(function(){
	$.formValidator.initConfig({formID:"myform",theme:"126",submitOnce:false,
	onError:function(msg,obj,errorlist){
		$("#errorlist").empty();
		$.map(errorlist,function(msg){
			$("#errorlist").append("<li>" + msg + "</li>")
		});
		alert(msg);
	},
	ajaxPrompt : '有数据正在异步验证，请稍等...'
	});

	/*功能代码验证*/
	$("#ename").formValidator({
		onShowText:"请输入功能代码",
		onShow:"",
		onFocus:"",
		onCorrect:"输入正确",
		leftTrim:true,
		rightTrim:true
	}).regexValidator({
		regExp:"^[a-zA-Z]{1,}([0-9]|[a-zA-Z])+$",
		onError:"功能代码格式不正确"
	});

        /*功能代码验证*/
        $("#ename").formValidator({
            onShowText:"请输入功能代码",
            onShow:"",
            onFocus:"",
            onCorrect:"输入正确"
        }).regexValidator({
            regExp:"^[a-zA-Z]{1,}([0-9]|[a-zA-Z])+$",
            onError:"功能代码格式不正确"
        });

	/*功能名称验证*/
	$("#cname").formValidator({
		onShowText:"请输入功能名称",
		onShow:"",
		onFocus:"",
		onCorrect:"输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min:1,
		onError:"功能名称不能为空"
	});

	/*模块名称验证*/
	$("#m").formValidator({
		onShowText:"请输入模块名称",
		onShow:"",
		onFocus:"",
		onCorrect:"输入正确",
		leftTrim:true,
		rightTrim:true
	}).regexValidator({
		regExp:"^[a-zA-Z]{1,}([0-9]|[a-zA-Z])+$",
		onError:"模块名称格式不正确"
	});


	/*文件名称验证*/
	$("#c").formValidator({
		onShowText:"请输入文件名称",
		onShow:"",
		onFocus:"",
		onCorrect:"输入正确",
		leftTrim:true,
		rightTrim:true
	}).regexValidator({
		regExp:"^[a-zA-Z]{1,}([0-9]|[a-zA-Z])+$",
		onError:"文件名称格式不正确"
	});


	/*方法名称验证*/
	$("#a").formValidator({
		onShowText:"请输入方法名称",
		onShow:"",
		onFocus:"",
		onCorrect:"输入正确",
		leftTrim:true,
		rightTrim:true
	}).regexValidator({
		regExp:"^[a-zA-Z]{1,}([0-9]|[a-zA-Z])+$",
		onError:"方法名称格式不正确"
	});
})
</script>
<?php exit; ?>